import service from '@/utils/request'

export const useCustomerApi = (id: Number) => {
	return service.get('/sys/customer/' + id)
}
export const getCustomerApi = (dataForm: any) => {
	return service.post('/sys/customer/selpage', dataForm)
}
export const useCustomerSubmitApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.put('/sys/customer', dataForm)
	} else {
		return service.post('/sys/customer/save', dataForm)
	}
}
export const useCustomerFileApi = (dataForm: any) => {
	return service.post('/sys/customer/savefile', dataForm)
}
export const useCustomerListApi = (dataForm: any) => {
	return service.post('/sys/customer/list', dataForm)
}
